package org.xdq.观察者模式;

public class Productor implements Observer {

    @Override
    public void update(Object arg) {
        int priceVar = (Integer)arg;
        if(priceVar > 0){
            System.out.println("生产者：涨价了，行情不错！");
        }else if(priceVar < 0){
            System.out.println("生产者：价格又跌了，要过紧日子！");
        }
    }
}
